-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Core/Scene stringnames consistently #91909
Conversation
7d0bec4
to
322159d
Compare
Ok I don't know where to put scene string names include :/ |
f455155
to
794e242
Compare
794e242
to
413c113
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were planning to do one of these myself, and looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't review in depth, but makes sense to me.
I wrote some simple Ruby script that scans the codebase for StringNames: EDIT: |
Thanks! |
Follow-up to #81303
Replaces #50941
This PR solidifies usage of CoreStringNames and SceneStringNames by replacing every string instance by its singleton equivalent, if it already existed. I also removed some duplicate or unused names. I might have missed some very common names, as it's difficult to find them in all replaceable contexts.
Up to discussion, but I included core string names in
variant.h
and scene string names innode.h
andresource.h
. This makes them easily accessible without extra includes. These files are not modified often, so it's probably fine to do that. I removed all other includes of these files. I didn't do the same for EditorStringNames, because they are included in much more files and there is no single file that's included in all editor code.Note that it's rather unreasonable to enforce using singleton string names when available,. We could just replace some newly added strings from time to time. Maybe I'll make a helper script for that.